CC = g++
CFLAGS = -c -Wall
O_CV_FLAGS = `pkg-config opencv --cflags`
O_CV_LIBS = `pkg-config opencv --libs`
OBJS_PROJECT_1 = main.o selectBox.o
PROJECT_1 = selectBox

$(PROJECT_1): $(OBJS_PROJECT_1)
	$(CC) $(O_CV_FLAGS) $(OBJS_PROJECT_1) -o $(PROJECT_1) $(O_CV_LIBS)

main.o: main.cpp selectBox.h
	$(CC) $(CFLAGS) main.cpp 

selectBox.o: selectBox.h selectBox.cpp
	$(CC) $(CFLAGS) selectBox.cpp 

clean: 
	rm -rf *.o *~

clean_all:
	rm -rf *.o *~ $(PROJECT_1)

.PHONY: clean clean_all all
